<?
/**
 * Engine Core Component.
 *
 * This is the general handling file - all handling is ignited right here.
 *
 * Please read the LICENSE file
 * @license 	GNU Lesser General Public License
 * @copyright 	oneDot only <we@onedotonly.be>
 * @author 		Koen Betsens <koen@onedotonly.be>
 *
 * @package 	Global
 */



# load the request cycle class and the global functions.
include "class/IGNITE.php";
include "combustion.functions.php";

# start cycle.
IGNITE::cycle();


/**
 * Enable Class auto-load (php function)
 *
 * @param 	string 	$classname		namestring of the requested class (and it's containing file)
 * @return	void
 */
 

 
function __autoload ( $classname ) {

	if( file_exists( $file = ENGINE_CORE . IGNITE::classes_loc . $classname . ".php" )
	||  $file = IsInSubdir( ENGINE_CORE . IGNITE::classes_loc, $classname . ".php" ))
				
		require_once $file;
}


# Module constructor
$Modcon = new MOD_CONSTRUCT();


# Endgame - retreive current Engine class ( front / CMS / Core )
$Engine = IGNITE::engine();


# Secondary global constants
if( $Page && $Page->get('theme')) $theme = $Page->get('theme'); 

define( "THEME", "/theme/" . ( $theme? $theme: engine_get( "theme" )) . "/", true );
define( "PUBLIC_THEME", engine_get( "url" ) . THEME, true );

?>